<!DOCTYPE html>
<html lang="zh-cn">
<head>
	<meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">

    <title>销售表获取图文教程</title>
    <!-- Mobile Specific Metas -->
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="shortcut icon" href="images/favicon.ico"/>
    <link rel="bookmark" href="images/favicon.ico" type="image/x-icon" />
    <script src="js/jquery.min.js"></script>
    <script type="text/javascript" src="js/bdtj.js"></script>
</head>
<body>
	<div style="width:1000px;margin:auto;">
	<h4>1.登录淘宝<a target="_blank" style="color:rgb(241,49,49);padding-left:8px;" href="https://login.taobao.com/member/login.jhtml">点击登录</a></h4>
	<h4>2.进入卖家中心</h4>
	<p><img alt="" src="images/tips/xsb_tips1.png" style="width:820px;"></p>
	<h4>3.左边功能栏里选择“已卖出的宝贝”</h4>
	<p><img alt="" src="images/tips/xsb_tips2.png" style="height:300px;"></p>
	<h4>4.成交时间范围选择为据本月初的近24个月</h4>
	<p>例如现在是<input type="text" id="nowtime" value="2015-10-12" style="width:100px;">，则时间范围为：<span id="timespan" style="padding-right:10px;">从2013-10-01至2015-09-30</span><input  type="button" onclick="reset()" id="reset" value="重新生成时间范围"/></p>
	<p><img alt="" src="images/tips/xsb_tips3.png" style="width:820px;"></p>
	<h4>5.点击批量导出-->生成报表<span style="color:rgb(249,41,41);padding-left:10px;">注：若导出时提示拆分成多个文件,请先导出三个月前的订单再导出近3个月的。<a href="lsxsbtips.html">导出三个月前订单操作指引点击这里</a></span></h4>
	<p><img alt="" src="images/tips/xsb_tips4.png" style="width:820px;"></p>
	<h4>6.下载订单报表并上传<span style="color:rgb(249,41,41);padding-left:10px;">注：若文件上传有问题，请联系客服QQ：47245742</span></h4>
	<p><img alt="" src="images/tips/xsb_tips5.png" style="width:820px;"></p>
	</div>
	<script>
	function getNowFormatDate() {
        var date = new Date();
        var seperator1 = "-";
        var year = date.getFullYear();
        var month = date.getMonth() + 1;
        var strDate = date.getDate();
        if (month >= 1 && month <= 9) {
            month = "0" + month;
        }
        if (strDate >= 0 && strDate <= 9) {
            strDate = "0" + strDate;
        }
        var currentdate = year + seperator1 + month + seperator1 + strDate;
        return currentdate;
    }
	
	function isLeapYear(year) {  return (year % 4 == 0) && (year % 100 != 0 || year % 400 == 0);  }
	
	function getDay(month,year){
		var pday = 31;
		if(month != 2){
			switch(month){
			case 1:
			case 3:
			case 5:
			case 7:
			case 8:
			case 10:
			case 12:pday=31;break;
			case 4:
			case 6:
			case 9:
			case 11:pday=30;break;
			}
		}else{
			if(isLeapYear(year)){
				pday = 29;
			}else{
				pday = 28;
			}
		}
        if (pday >= 0 && pday <= 9) {
        	pday = "0" + pday;
        }
		return pday;
	}
	
	function resetTime(ntime){
		var sntime = ntime.split('-');
		var month = sntime[1]-1;
		var year = sntime[0];
		var syear = 0;
		var smonth = 0;
		if(month == 0){
			year = year - 1;
			month = 12;
			syear = year - 1;
			smonth = 1;
		}else{
			syear = year - 2;
			smonth = month + 1;
		}
		var pday = getDay(month,year);
		var sday = "01";
		if (month >= 1 && month <= 9) {
            month = "0" + month;
        }
		if (smonth >= 1 && smonth <= 9) {
			smonth = "0" + smonth;
        }
		
		var stime = syear+"-"+smonth+"-"+sday;
		var etime = year+"-"+month+"-"+pday;
		$("#timespan").html("从"+stime+"至"+etime);
	
	}
	
	function reset(){
		var time = $("#nowtime").val();
		resetTime(time);
	}
	
	function init(){
		$("#nowtime").val(getNowFormatDate);
		resetTime(getNowFormatDate());
	}
	
	window.onload = init();
	</script>
</body>